package club.banyuan;

import java.net.DatagramSocket;
import java.net.SocketException;

public class PortTest {
    public static void main(String[] args) {

        for (int i = 0; i < 65535; i++) {
            try {
                DatagramSocket datagramSocket = new DatagramSocket(i);
                datagramSocket.close();
            } catch (SocketException e) {
                System.out.println(i);
            }
        }
    }
}
